<include file="layout/header" />
<!-- Right side column. Contains the navbar and content of the page -->
<script language="javascript">
	/**
	 *  返回，带上查询的单位名称条件
	 */
	function fungoback(){
	    var str = "__APP__/Admin/Contract/recordSearch";
	    $("#formContractList").attr("action", str);
	    $("#formContractList").submit(); 
	}
	/**
	 * 展示新增页面
	 */
	 function showAdd(cid){
        var str = "__APP__/Admin/ContractPlus/recordNew/cid/" + cid;
        $("#formContractList").attr("action", str);
        $("#formContractList").submit(); 		
	}
    /**
     * 删除
     */
     function delOne(id,cid){
        var str = "__APP__/Admin/ContractPlus/recordDelete/id/" + id + "/cid/" + cid;
        $("#formContractList").attr("action", str);
        $("#formContractList").submit();        
    }	
</script>
<aside class="right-side">
	<section class="content-header">
		<h1>
			合同签订 <small>Contract Make</small>
		</h1>
	</section>
	<section class="content">
		<div class="row">
			<div class="col-xs-12">
				<div class="box">
					<div class="box-body table-responsive">
						<button class="btn btn-app btn-sm" onclick="fungoback();">返回</button>
						<button class="btn btn-app btn-sm" onclick="showAdd({$cid});">新增</button>
						<form method="post" action="" role="form" id="formContractList">
							<input type="hidden" id="cid" name="cid" value="{$cid}" />
                            <input type="hidden" id="p_name" name="p_name" value="{$p_name}" />
						</form>
						<table id="example2"
							class="table table-bordered table-hover text-left">
							<thead>
								<tr>
									<th class="text-center">操作</th>
									<th class="text-center">产品名称</th>
									<th class="text-center">产品规格</th>
									<th class="text-center">物料编号</th>
									<th class="text-center">类型</th>
									<th class="text-center">产品单价</th>
									<th class="text-center">产品数量</th>
									<th class="text-center">总金额</th>
								</tr>
							</thead>
							<tbody>
								<volist name="contract_pluses" id="contract_plus">
								<tr>
									<td class="text-center">
										<button class="btn btn-danger btn-sm"
											onclick="delOne('{$contract_plus.id}','{$cid}');">
											<i class="fa fa-times"></i>
										</button>
									</td>
									<td>{$contract_plus.c_name}</td>
									<td>{$contract_plus.c_guige}</td>
									<td>{$contract_plus.remark}</td>
									<td>{$contract_plus.c_type}</td>
									<td>{$contract_plus.c_price}</td>
									<td>{$contract_plus.c_number}</td>
									<td>{$contract_plus.c_total}</td>
								</tr>
								</volist>
							</tbody>
						</table>
					</div>
					<!-- /.box-body -->
				</div>
				<!-- /.box -->
			</div>
		</div>
	</section>
</aside>
<!-- /.right-side -->
<include file="layout/footer" />